package com.ay.weixin.fdc.boss.kanfang.db;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import lizar.db.ibatis.Dao;

import com.ay.weixin.fdc.boss.kanfang.domain.KanFangFlow;

public class IbatisKanFangFlowDao extends Dao{

	public void insert(KanFangFlow flow) throws SQLException{
		this.sqlMapper.insert("fdc_kanfang_flow.insert",flow);
	}
	
	public List<KanFangFlow> getFlow(long kanfang_id) throws SQLException{
		return (List<KanFangFlow>)this.sqlMapper.queryForList("fdc_kanfang_flow.getFlow",kanfang_id);
	}
	
	public KanFangFlow getFlowByStatus(long kanfang_id,int status) throws SQLException{
		Map<String,Object> map=new HashMap<String,Object>();
		map.put("kf_id", kanfang_id);
		map.put("status", status);
		return (KanFangFlow)this.sqlMapper.queryForObject("fdc_kanfang_flow.getFlowByStatus",map);
		
	}
}
